<template>
  <div>
    <el-dialog title="选择一项" :visible.sync="excelTpl" width="450px" @close="close()">
      <el-form>
        <el-form-item label="选择导出模板" label-width="130px">
          <el-select v-model="tpl" placeholder="请选择活动区域" @change="change()">
            <el-option label="收件量模板" value="shoujian"></el-option>
            <el-option label="办结量模板" value="banjie"></el-option>
            <el-option label="正常办理中模板" value="zcbl"></el-option>
            <el-option label="超期件模板" value="cq"></el-option>
            <el-option label="按时办结模板" value="asbj"></el-option>
            <el-option label="满意率模板" value="my"></el-option>
            <el-option label="自定义模板" value="diy"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="选择自定义模板" v-if="diyTPL" label-width="130px">
          <el-select v-model="diyTPLID" placeholder="请选择活动区域">

          </el-select>
          <el-button @click="newTpl()" size="mini" type="primary">+ 新增模板</el-button>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click="close()">取 消</el-button>
        <el-button type="primary" @click="dialogFormVisible = false">确 定</el-button>
      </div>
    </el-dialog>




    <el-dialog title="新增自定义模板" :visible.sync="diydialog" width="450px" @close="close2()">
      <el-form>
        <el-form-item label="选择导出项"  label-width="130px">
          <el-checkbox-group v-model="checkList">
            <el-checkbox label="复选框 A"></el-checkbox>
          </el-checkbox-group>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click="close2()">取 消</el-button>
        <el-button type="primary" @click="dialogFormVisible = false">确 定</el-button>
      </div>
    </el-dialog>


  </div>
</template>

<script>

export default {
  name: 'Exceltpl',
  data() {
    return {
      tpl: 'shoujian',
      diyTPL: false,
      diydialog:false,
      diyTPLID: '请选择自定义模板',
      excelTpl: false
    }
  },
  computed: {},
  methods: {
    close() {
      this.excelTpl = false
    },
    close2() {
      this.diydialog = false
    },
    explortExcel() {
      this.excelTpl = true
    },

    change() {
      if (this.tpl == 'diy') {
        this.diyTPL = true
      } else {
        this.diyTPL = false
      }
    },
    newTpl() {
      this.diydialog = true
    },
  }
}
</script>

<style scoped>

</style>
